{% extends "../_layout.html" %}

{% block script %}

    <script>
        // Render in hidden elements
        $('a[data-toggle="tab"]').on('shown.bs.tab', function (e) {});
    </script>

{% endblock %}


{% block sidebar_main %}
  <!-- Main sidebar -->
  <div class="sidebar sidebar-main sidebar-default sidebar-fixed">
    <div class="sidebar-content">
      <div class="sidebar-user">
        <div class="category-content alpha-grey">

          <div class="media">
            <div class="media-left">
              <a href="/static/assets/images/avatar.png" data-popup="lightbox">
                <img src="/static/assets/images/avatar.png" alt="<$ user_info.name  $>" class="img-circle img-lg">

              </a>
            </div>

            <div class="media-body ">
              <h6 class="media-heading"><$ user_info.name  $></h6>
            </div>

            <div class="media-right media-middle">
              <ul class="icons-list icons-list-vertical">
                <li class="dropdown">
                  <a href="#" class="dropdown-toggle" data-toggle="dropdown"><i class="icon-menu text-grey"></i></a>
                  <ul class="dropdown-menu dropdown-menu-right">
                    <li><a href="#"><i class=" icon-image2 pull-right"></i> 上传新头像</a></li>
                    <li><a href="#"><i class=" pull-right"></i> 使用 Avatar</a></li>
                  </ul>
                </li>
              </ul>
            </div>
          </div>
        </div>
      </div>

      <!-- Main navigation -->
      <div class="sidebar-category sidebar-category-visible">
        <div class="category-content no-padding">

          <ul class="navigation navigation-main navigation-accordion">
            <li class="{% if http.module == 'account' %}active{% endif %}"><a href="#settings" data-toggle="tab"><i class="icon-user"></i> 个人信息</a></li>
            <li><a href="#account" data-toggle="tab"><i class="icon-lock2"></i> 账号密码</a></li>
            <li><a href="" data-toggle="tab"><i class="icon-power2"></i>安全设置</a></li>
              {#<a href="#" class="list-group-item"><i class="icon-calendar3"></i> 事件 <span class="badge bg-teal-400 pull-right">48</span></a>#}

          </ul>
        </div>
      </div>
    </div>
  </div>
  <!-- /main sidebar -->

{% endblock %}
{#{% block bodyStyle %} has-detached-right {% endblock %}#}
{% block content %}
  <!-- User profile -->
  <div class="row ">
    <div class="col-lg-8">
      <div class="tabbable">
        <div class="tab-content">
          <div class="tab-pane fade" id="activity">

          </div>


          <div class="tab-pane fade " id="account">
            <!-- Account settings -->
            <div class="panel panel-default">
              <div class="panel-heading">
                <h6 class="panel-title">账号设置</h6>
                <div class="heading-elements">
                  <ul class="icons-list">
                      {#<li><a data-action="collapse"></a></li>#}
                      {#<li><a data-action="reload"></a></li>#}
                      {#<li><a data-action="close"></a></li>#}
                  </ul>
                </div>
              </div>

              <div class="panel-body">
                <form action="#">
                  <div class="form-group">
                    <div class="row">
                      <div class="col-md-6">
                        <label>账户名</label>
                        <input type="text" value="<$ user_info.username  $>" readonly="readonly" class="form-control">
                      </div>

                      <div class="col-md-6">
                        <label>当前密码</label>
                        <input type="password" value="password" readonly="readonly" class="form-control">
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <div class="row">
                      <div class="col-md-6">
                        <label>新密码</label>
                        <input type="password" placeholder="输入新密码" class="form-control">
                      </div>

                      <div class="col-md-6">
                        <label>再次输入新密码</label>
                        <input type="password" placeholder="再次输入新密码" class="form-control">
                      </div>
                    </div>
                  </div>

                  <div class="form-group">
                    <div class="row">
                      <div class="col-md-6">
                        <label>隐私设置</label>

                        <div class="radio">
                          <label>
                            <input type="radio" name="visibility" class="styled" checked="checked">
                            所有人可见
                          </label>
                        </div>

                        <div class="radio">
                          <label>
                            <input type="radio" name="visibility" class="styled">
                            好友可见
                          </label>
                        </div>

                        <div class="radio">
                          <label>
                            <input type="radio" name="visibility" class="styled">
                            只有团队可见
                          </label>
                        </div>

                        <div class="radio">
                          <label>
                            <input type="radio" name="visibility" class="styled">
                            应用可见
                          </label>
                        </div>
                      </div>

                      <div class="col-md-6">
                        <label>消息提醒</label>

                        <div class="checkbox">
                          <label>
                            <input type="checkbox" class="styled" checked="checked">
                            密码过期提醒
                          </label>
                        </div>

                        <div class="checkbox">
                          <label>
                            <input type="checkbox" class="styled" checked="checked">
                            新消息提醒
                          </label>
                        </div>

                        <div class="checkbox">
                          <label>
                            <input type="checkbox" class="styled" checked="checked">
                            新任务提醒
                          </label>
                        </div>

                        <div class="checkbox">
                          <label>
                            <input type="checkbox" class="styled">
                            新关联请求提醒
                          </label>
                        </div>
                      </div>
                    </div>
                  </div>

                  <div class="text-right">
                    <button type="submit" class="btn btn-primary">保存 <i class="icon-arrow-right14 position-right"></i></button>
                  </div>
                </form>
              </div>
            </div>
            <!-- /account settings -->

          </div>


          <div class="tab-pane fade fadeInUp in active" id="settings">

            <!-- Profile info -->
            <div class="panel panel-flat ">
              <div class="panel-heading">
                <h6 class="panel-title">个人信息</h6>
                <div class="heading-elements">
                  <ul class="icons-list">
                      {#<li><a data-action="collapse"></a></li>#}
                  </ul>
                </div>
              </div>

              <div class="panel-body">
                <form role="form" action="/uc/seting/updateinfo" method="post" class="form-horizontal form-info">
                  <div class="form-group">
                    <label class="col-md-2 control-label">会员账号</label>
                    <div class="col-md-6">
                      <p class="form-control-static"><$user_info.username $></p>
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-md-2 control-label">邮箱</label>
                    <div class="col-md-6">
                      <input type="email" placeholder="email" class="form-control" name="email" value="<$user_info.email $>">
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-md-2 control-label">真实姓名</label>
                    <div class="col-md-6">
                      <input type="text" placeholder="真实姓名" class="form-control" name="real_name" value="<$user_info.real_name $>">
                    </div>
                  </div>
                  <div class="form-group">

                    <label class="col-md-2 control-label text-semibold">性别</label>
                    <div class="col-md-6">

                      <label class="radio-inline text-primary">
                        <input type="radio" {%if user_info.sex == 1 %} checked="checked"{%endif%} value="1" name="sex">
                        男
                      </label>

                      <label class="radio-inline text-pink">
                        <input type="radio" {%if user_info.sex == 2 %} checked="checked"{%endif%} value="2" name="sex">
                        女
                      </label>
                    </div>
                  </div>

                  <div class="form-group">
                    <label class="col-md-2 control-label">生日</label>
                    <div class="col-md-6">
                      <input type="text" name="birthday" value="<$user_info.birthday|dateformat('Y-m-d') $>" class="form-control masked" data-format="9999-99-99" data-placeholder="_" placeholder="年-月-日">
                    </div>
                  </div>
                  <div class="form-group">
                    <label class="col-md-2 control-label">手机号码</label>
                    <div class="col-md-6">
                      <input type="text" name="mobile" value="<$user_info.mobile $>" class="form-control masked" data-format="99999999999" data-placeholder="X" placeholder="手机号码">
                    </div></div>
                  <div class="form-group">
                    <div class="col-md-2"></div>
                  <div class="col-md-6">
                    <button class="btn btn-primary btn-block ajax-post" target-form="form-info" type="submit" >保存 </button>

                  </div>
                  </div>
                </form>

              </div>
            </div>
            <!-- /profile info -->

          </div>
        </div>
      </div>
    </div>
  </div>
  <!-- /user profile -->
{% endblock %}


